package com.more.offer.designpatterns.adapter.adapter2;

/**
 * @author pinoc
 * @date 2021/11/4
 * @description
 */
public class ThreeSocket {

	private int socketNum;

	public ThreeSocket(int socketNum) {
		this.socketNum = socketNum;
	}

	public int getSocketNum() {
		return socketNum;
	}

	public void setSocketNum(int socketNum) {
		this.socketNum = socketNum;
	}

	public boolean isAdapt(ThreePlug plug){
		if(plug!= null && (plug.getPlugNum() == this.socketNum)) {
			System.out.println("适配。");
			return true;
		}
		return false;
	}
}
